<?php session_start();?>
<?php 
	if($_SESSION['username']=="admin"){
		$unit = $_REQUEST['unit'];
	}
	else{
		$unit = $_SESSION['username'];
	}

?>
		<h2>Unit <?php echo $unit?></h2>
		<?php
		
		require_once("../../models/Unit.php");
		$unit = new Unit;
		$unit->connect();
		if(($_SESSION['username'])=="admin"&&isset($_REQUEST['unit'])){
			if($unit->isOccupied($_REQUEST['unit'])){?>
				<div id="changePasswordForm" title="Change Password">
				</div>
				<br />
				<a href="#" onclick="addpayment();">Add Payment</a><br />
				<a href="#" onclick="viewChangePasswordForm();">Change Password</a>

			<?php }
		}
		
		
		?>


		